
<span class="layui-btn">总数
        <?
        echo count($coupo_list);
        ?>
    </span>



    <span class="layui-btn">已使用
        <?
        $p['key']="is_use";//需要统计的键值
        $p['value']="1";//需要统计
        echo count_sum_with_key_in_2d_array($coupo_list,$p);
        ?>
    </span>





    <table class="layui-table">
        <colgroup>
            <col width="60">
            <col width="200">
            <col >
            <col >
            <col >
            <col >

            <col >
            <col width="320">

            <col>
        </colgroup>
        <thead>
        <tr>
            <th>序号</th>
            <th>优惠券名称</th>
            <th>优惠价格</th>
            <th>优惠折扣</th>
            <!--      <th>使用开始时间</th>-->
            <th>使用结束时间</th>
            <th>优惠券类型</th>
            <th>免单券</th>
            <th>范围</th>
            <th>状态</th>
        </tr>
        </thead>
        <tbody>


        <?php
        $detail=$coupo_list;
        for ($i = 0; $i < count($coupo_list); $i++) {
            ?>
            <tr id="item<?echo $detail[$i]['nid']?>" >
                <td><? echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>
                <td><? echo $detail[$i]['name']?></td>
                <td><? echo $detail[$i]['reduce_price']?></td>
                <td><? echo $detail[$i]['discount']?></td>

                <!--      <td>--><?// echo $detail[$i]['start_time'] ==  '' ? '' : date("Y-m-d",$detail[$i]['start_time'])?><!--</td>-->
                <td><? if($detail[$i]['expire_day'])
                    {echo $detail[$i]['expire_day'];}
                    else{echo $detail[$i]['end_time'] ==  '' ? '' : date("Y-m-d",$detail[$i]['end_time']);}?></td>
                <td><?
                    if($detail[$i]['coupon_type']=="10"){echo "定额券";}
                    if($detail[$i]['coupon_type']=="20"){echo "分享折扣券";}
                    if($detail[$i]['coupon_type']=="30"){echo "邀请折扣券";}
                    if($detail[$i]['coupon_type']=="40"){echo "指定金额券";}
                    ?>
                </td>
                <td><? if($detail[$i]['is_free']){echo "是";}else{echo "否";}?></td>
                <td><? echo $coupon_pinlei_list[$detail[$i]['coupon_id']]?></td>

                <td><?
                    if($detail[$i]['is_use']=="1"){echo "<span style='background-color: #FFB800'>已使用</span>";}
                    if($detail[$i]['is_use']=="0"){echo "未使用";}
                    ?>
                </td>


            </tr>
            <?php

        }
        ?>

        </tbody>
    </table>
